import request from '@/utils/request'
// 获取 list
export const getlist = (params) => request.get('api/location/pageDetail', { params })

// 新增页面api
// 获取启用的仓库信息
export const warehouse = () => request.get('api/warehouse/list?status=1')
// 根据仓库信息获取库区信息
export const area = (id) => request.get(`api/area/list?warehouseId=${id}&status=1`)
// 新增库位
export const add = (data) => request.post('api/location', data)
// 获取库位编号
export const getCode = () => request.get('api/codeFactory/next/KW')
// 根据id查询库位信息 回显
export const detail = id => request.get(`api/location/${id}`)
// 更新库位信息
export const put = (data) => request.put('api/location', data)
// 库位管理页面api
// 删除接口
export const del = id => request.delete('api/location', { params: { 'ids[]': id } })
// 导入excel
export const upload = data => request.post('/api/location/upload', data)
